home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Examples / randomModels / cubeOSpheres2.mdl / model.eve
Encoding:
Text File  |  1995-03-22  |  835 b   |  31 lines

  1. set sphereCount 3
  2. set sphereRadius .1
  3. set sphereSpacing .25
  4.  
  5. # if it returns 1, continue, if it returns 0, (nicely) abort the script
  6. if {[loadControlPanelModallyAndClose starCount.nib]} {} {return }
  7.  
  8. proc buildSpheres { sCount sSpacing sRadius } {
  9.    
  10.   for {set i 0} {$i < $sCount} {incr i} \
  11.   {  for {set j 0} {$j < $sCount} {incr j} \
  12.      {  for {set k 0} {$k < $sCount} {incr k} \
  13.         {  AttributeBegin
  14.              set newX [expr {$i * $sSpacing}] 
  15.              set newY [expr {$j * $sSpacing}] 
  16.              set newZ [expr {$k * $sSpacing}] 
  17.              Translate $newX $newY $newZ
  18.              Sphere $sRadius [expr {-$sRadius}] $sRadius 360
  19.            AttributeEnd
  20.         }
  21.      }
  22.   }
  23. }
  24.  
  25. startShape theGalaxy
  26.   EveProc {buildSpheres $sphereCount $sphereSpacing $sphereRadius }
  27. endShape
  28.  
  29. loadControlPanel starFrob.nib
  30.  
  31.